package cn.changeforyou.web.cloud.auth.service.impl;

import cn.changeforyou.web.cloud.auth.datastruct.OrgTree;
import cn.changeforyou.web.cloud.auth.entity.OrgInfo;
import cn.changeforyou.web.cloud.auth.manager.AuthCacheManager;
import cn.changeforyou.web.cloud.auth.mapper.OrgInfoMapper;
import cn.changeforyou.web.cloud.auth.service.OrgInfoService;
import cn.changeforyou.web.cloud.webBase.auth.OrgModel;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 *
 */
@Service
public class OrgInfoServiceImpl extends ServiceImpl<OrgInfoMapper, OrgInfo>
        implements OrgInfoService {

    @Resource
    private AuthCacheManager authCacheManager;

    @Override
    public OrgModel getOrgModelById(Integer id) {
        OrgTree orgTree = authCacheManager.getOrgTree();
        return orgTree.getOrgModelById(id);
    }

}




